package com.gwtcx.sample.serendipity.client.view;

import com.gwtcx.client.smartgwt.view.SignInPageView;
import com.gwtcx.client.smartgwt.view.handlers.SignInPageUiHandlers;
import com.gwtcx.sample.serendipity.client.presenter.SerendipitySignInPagePresenter;

public class SerendipitySignInPageView extends SignInPageView<SignInPageUiHandlers> 
implements SerendipitySignInPagePresenter.MyView {

	private static final String DEFAULT_USER_NAME = "Administrator";
	private static final String DEFAULT_PASSWORD = "N0More$ecrets";

	private static String html = "<div>\n"
		+ "<table align=\"center\">\n"
		+ "  <tr>\n" + "<td>&nbsp;</td>\n" + "<td>&nbsp;</td>\n" + "</tr>\n"
		+ "  <tr>\n" + "<td>&nbsp;</td>\n" + "<td>&nbsp;</td>\n" + "</tr>\n"
		+ "  <tr>\n" + "<td>&nbsp;</td>\n" + "<td>&nbsp;</td>\n" + "</tr>\n"
		+ "  <tr>\n" + "<td>&nbsp;</td>\n" + "<td>&nbsp;</td>\n" + "</tr>\n"
		+ "  <tr>\n" + "<td>&nbsp;</td>\n" + "<td>&nbsp;</td>\n" + "</tr>\n"
		+ "  <tr>\n"
		+ "    <td colspan=\"2\" style=\"font-weight:bold;\">Sign In <img src=\"images/signin.gif\"/></td>\n"
		+ "  </tr>\n"
		+ "  <tr>\n"
		+ "    <td>User name</td>\n"
		+ "    <td id=\"userNameFieldContainer\"></td>\n"
		+ "  </tr>\n"
		+ "  <tr>\n"
		+ "    <td>Password</td>\n"
		+ "    <td id=\"passwordFieldContainer\"></td>\n"
		+ "  </tr>\n"
		+ "  <tr>\n"
		+ "    <td></td>\n"
		+ "    <td id=\"signInButtonContainer\"></td>\n"
		+ "  </tr>\n"
		+ "  <tr>\n" + "<td>&nbsp;</td>\n" + "<td>&nbsp;</td>\n" + "</tr>\n"
		+ "  <tr>\n"
		+ "    <td colspan=\"2\">Forget your password?</td>\n"
		+ "  </tr>\n"
		+ "  <tr>\n"
		+ "    <td colspan=\"2\">Contact your Serendipity administrator.</td>\n"
		+ "  </tr>\n"
		+ "</table>\n"
		+ "</div>\n";


	public SerendipitySignInPageView() {
		super();  
	
		getUserName().setText(DEFAULT_USER_NAME);
		getPassword().setText(DEFAULT_PASSWORD); 
	}

	@Override
	protected String getPanelHtml() {
		return html;
	}
}

